<template>
  <div>
    <webHead />
    <div class="tags-panel">
      <ul class="tags-lines">
        <li class="tags-line" data-val="{tagTypeName:'cat'}">
          <div class="tags-title">类型 :</div>
          <ul class="tags">
            <li class="active" data-state-val="{ catTagName:'全部'}">
              <a
                data-act="tag-click"
                data-val="{TagName:'全部'}"
                href="javascript:void(0);"
                style="cursor: default"
              >全部</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'爱情'}"
                href="javascript:void(0);"
              >爱情</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'喜剧'}"
                href="javascript:void(0);"
              >喜剧</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'动画'}"
                href="javascript:void(0);"
              >动画</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'剧情'}"
                href="javascript:void(0);"
              >剧情</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'恐怖'}"
                href="javascript:void(0);"
              >恐怖</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'惊悚'}"
                href="javascript:void(0);"
              >惊悚</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'科幻'}"
                href="javascript:void(0);"
              >科幻</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'动作'}"
                href="javascript:void(0);"
              >动作</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'悬疑'}"
                href="javascript:void(0);"
              >悬疑</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'犯罪'}"
                href="javascript:void(0);"
              >犯罪</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'冒险'}"
                href="javascript:void(0);"
              >冒险</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'战争'}"
                href="javascript:void(0);"
              >战争</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'奇幻'}"
                href="javascript:void(0);"
              >奇幻</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'运动'}"
                href="javascript:void(0);"
              >运动</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'家庭'}"
                href="javascript:void(0);"
              >家庭</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'古装'}"
                href="javascript:void(0);"
              >古装</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'武侠'}"
                href="javascript:void(0);"
              >武侠</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'西部'}"
                href="javascript:void(0);"
              >西部</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'历史'}"
                href="javascript:void(0);"
              >历史</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'传记'}"
                href="javascript:void(0);"
              >传记</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'歌舞'}"
                href="javascript:void(0);"
              >歌舞</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'黑色电影'}"
                href="javascript:void(0);"
              >黑色电影</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'短片'}"
                href="javascript:void(0);"
              >短片</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'纪录片'}"
                href="javascript:void(0);"
              >纪录片</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'戏曲'}"
                href="javascript:void(0);"
              >戏曲</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'音乐'}"
                href="javascript:void(0);"
              >音乐</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'灾难'}"
                href="javascript:void(0);"
              >灾难</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'青春'}"
                href="javascript:void(0);"
              >青春</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'儿童'}"
                href="javascript:void(0);"
              >儿童</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'其他'}"
                href="javascript:void(0);"
              >其他</a>
            </li>
          </ul>
        </li>
        <li
          class="tags-line tags-line-border"
          data-val="{tagTypeName:'source'}"
        >
          <div class="tags-title">区域 :</div>
          <ul class="tags">
            <li class="active" data-state-val="{ sourceTagName:'全部'}">
              <a
                data-act="tag-click"
                data-val="{TagName:'全部'}"
                href="javascript:void(0);"
                style="cursor: default"
              >全部</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'大陆'}"
                href="javascript:void(0);"
              >大陆</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'美国'}"
                href="javascript:void(0);"
              >美国</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'韩国'}"
                href="javascript:void(0);"
              >韩国</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'日本'}"
                href="javascript:void(0);"
              >日本</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'中国香港'}"
                href="javascript:void(0);"
              >中国香港</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'中国台湾'}"
                href="javascript:void(0);"
              >中国台湾</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'泰国'}"
                href="javascript:void(0);"
              >泰国</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'印度'}"
                href="javascript:void(0);"
              >印度</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'法国'}"
                href="javascript:void(0);"
              >法国</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'英国'}"
                href="javascript:void(0);"
              >英国</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'俄罗斯'}"
                href="javascript:void(0);"
              >俄罗斯</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'意大利'}"
                href="javascript:void(0);"
              >意大利</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'西班牙'}"
                href="javascript:void(0);"
              >西班牙</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'德国'}"
                href="javascript:void(0);"
              >德国</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'波兰'}"
                href="javascript:void(0);"
              >波兰</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'澳大利亚'}"
                href="javascript:void(0);"
              >澳大利亚</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'伊朗'}"
                href="javascript:void(0);"
              >伊朗</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'其他'}"
                href="javascript:void(0);"
              >其他</a>
            </li>
          </ul>
        </li>
        <li class="tags-line tags-line-border" data-val="{tagTypeName:'year'}">
          <div class="tags-title">年代 :</div>
          <ul class="tags">
            <li class="active" data-state-val="{ yearTagName:'全部'}">
              <a
                data-act="tag-click"
                data-val="{TagName:'全部'}"
                href="javascript:void(0);"
                style="cursor: default"
              >全部</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2029'}"
                href="javascript:void(0);"
              >2029</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2028'}"
                href="javascript:void(0);"
              >2028</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2027'}"
                href="javascript:void(0);"
              >2027</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2026'}"
                href="javascript:void(0);"
              >2026</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2025'}"
                href="javascript:void(0);"
              >2025</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2024'}"
                href="javascript:void(0);"
              >2024</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2023'}"
                href="javascript:void(0);"
              >2023</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2022'}"
                href="javascript:void(0);"
              >2022</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2021'}"
                href="javascript:void(0);"
              >2021</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2020'}"
                href="javascript:void(0);"
              >2020</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2019'}"
                href="javascript:void(0);"
              >2019</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2018'}"
                href="javascript:void(0);"
              >2018</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2017'}"
                href="javascript:void(0);"
              >2017</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2016'}"
                href="javascript:void(0);"
              >2016</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2015'}"
                href="javascript:void(0);"
              >2015</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2014'}"
                href="javascript:void(0);"
              >2014</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2013'}"
                href="javascript:void(0);"
              >2013</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2012'}"
                href="javascript:void(0);"
              >2012</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2011'}"
                href="javascript:void(0);"
              >2011</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'2000-2010'}"
                href="javascript:void(0);"
              >2000-2010</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'90年代'}"
                href="javascript:void(0);"
              >90年代</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'80年代'}"
                href="javascript:void(0);"
              >80年代</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'70年代'}"
                href="javascript:void(0);"
              >70年代</a>
            </li>
            <li>
              <a
                data-act="tag-click"
                data-val="{TagName:'更早'}"
                href="javascript:void(0);"
              >更早</a>
            </li>
          </ul>
        </li>
      </ul>
    </div>
    <div class="movie-grid">
      <div class="panel">
        <!-- <div class="panel-header">
          <span class="panel-title">
            <span class="textcolor_red"
              ><h2>正在热映（{{ movieList.length }}部）</h2></span
            >
          </span>
          <span class="panel-more">
            <a
              href="javascript:;"
              class="textcolor_red"
              data-act="all-playingMovie-click"
            >
              <span>全部</span>
            </a>
            <span class="panel-arrow panel-arrow-red" />
          </span>
        </div> -->
        <div class="panel-content">
          <dl class="movie-list">
            <dd v-for="(item, i) in movieList" :key="i">
              <div class="movie-item">
                <a href="javascript:;">
                  <div class="movie-poster">
                    <img class="movie-poster-img" :src="item.imageUrl" alt="">
                    <div class="movie-overlay movie-overlay-bg">
                      <div class="movie-info">
                        <div class="movie-title" :title="item.name">
                          {{ item.name }}
                        </div>
                      </div>
                    </div>
                  </div>
                </a>
                <div class="movie-detail movie-detail-strong movie-sale">
                  <a href="javascript:;" class="active">购 票</a>
                </div>
              </div>
            </dd>
          </dl>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import webHead from './components/head.vue'
import { mapGetters } from 'vuex'
export default {
  name: 'Web',
  components: {
    webHead
  },
  data() {
    return { movieList: [] }
  },
  computed: {
    ...mapGetters(['userInfo'])
  },
  created() {
    this.getMovieList()
  },
  methods: {
    async getMovieList() {
      const movieArr = (await this.$localStorage.getItem('allMovies')) || []
      this.movieList = movieArr
      console.log(movieArr)
    },
    async logout() {
      debugger
      await this.$localStorage.removeItem('curUser')
      this.$router.push(`/login`)
    }
  }
}
</script>

  <style lang="scss" scoped>
.tags-panel {
  width: 1200px;
  margin: auto;
  border: 1px solid #e5e5e5;
  padding: 0 20px;
  margin-top: 140px;
}

.tags-panel li,
.tags-panel ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.tags-line {
  padding: 10px 0 !important;
}

.tags-line-border {
  border-top: 1px dotted #e5e5e5;
}

.tags-title {
  height: 24px;
  line-height: 24px;
  float: left;
  color: #999;
  font-size: 14px;
}

.tags {
  margin-left: 40px !important;
}

.tags a:hover {
  color: #ef4238;
}

.tags li {
  border-radius: 14px;
  padding: 3px 9px;
  display: inline-block;
  margin-left: 12px;
}

.tags li.active {
  background: #f34d41;
  color: #fff;
}

.tags li a {
  color: #333;
  font-size: 14px;
}

.tags li.active a {
  color: #fff;
}

.header form,
.header h3,
.header input,
.header li,
.header ul {
  padding: 0;
  margin: 0;
  list-style: none;
  border: none;
}

.header {
  position: fixed;
  top: 0;
  z-index: 999;
  width: 100%;
  min-width: 1200px;
  background-color: #fff;
  border-bottom: 1px solid #d8d8d8;
}

.header .header-inner {
  width: 1200px;
  margin: 0 auto;
  height: 80px;
}

.header-placeholder {
  height: 81px;
}

.header .logo {
  background: url(../../icons/image/logo.png) no-repeat 0;
  background-size: contain;
  overflow: hidden;
  margin-right: 20px;
}

.header .logo,
.header a.logo {
  float: left;
  width: 133px;
  height: 60px;
  margin-top: 10px;
}

.header a.logo {
  line-height: 100em;
}

.header .nav {
  background-color: #fff;
  overflow: hidden;
  width: 530px;
  float: left;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

.header .nav div {
  float: left;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
}
.more {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
}

.more:hover {
  border-color: #d8d8d8;
  border-bottom-color: #fff;
  border-left: 0.1px solid #dcd4d7;
  border-right: 0.1px solid #dcd4d7;
}

.more:hover .configlist {
  display: block;
}

.more:hover .caret {
  -webkit-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}

.more:hover:after {
  content: " ";
  position: absolute;
  bottom: -1px;
  left: 1px;
  right: 1px;
  background-color: #fff;
  z-index: 200;
}

.more .apptext {
  float: left;
  display: inline-block;
  font-size: 18px;
  color: #000;
  height: 24px;
  line-height: 24px;
  margin: 0 7px;
}

.more .caret {
  float: left;
  position: relative;
}

.more .configlist {
  display: none;
  width: 66px;
  position: absolute;
  top: 80px;
  background-color: #fff;
  border: 0.1px solid #dcd4d7;
  border-top: 0;
}

.more .configlist .config-item {
  color: #000;
  font-size: 18px !important;
  height: 0 !important;
  line-height: 35px !important;
  height: 35px !important;
}

.header .nav div a {
  text-align: center;
  display: inline-block;
  height: 80px;
  line-height: 80px;
  width: 100%;
  font-size: 18px;
  color: #333;
}

.header .nav div a:hover {
  color: #ef4238;
}

.header .nav div a.active {
  color: #fff;
  background-color: #ef4238;
}

.header form {
  float: right;
  margin: 20px 10px 0 0;
  position: relative;
}

.header form input {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.header form .search {
  display: inline-block;
  height: 40px;
  line-height: 1.2;
  width: 220px;
  padding: 0 40px 0 20px;
  border: 1px solid #ccc;
  font-size: 14px;
  border-radius: 30px;
  background-color: #faf8fa;
  overflow: hidden;
  color: #333;
  outline: none;
}

.ie8 .header form .search {
  padding-top: 11px;
}

.header form .submit {
  display: inline-block;
  position: absolute;
  left: 180px;
  top: 0;
  height: 40px;
  width: 40px;
  background-color: #ef4238;
  border-radius: 30px;
  background-image: url();
  cursor: pointer;
}

.header .user-info {
  float: right;
  position: relative;
  z-index: 9999;
  height: 100%;
}

.header .user-info .user-avatar {
  display: block;
  border: 1px solid transparent;
  border-top: none;
  border-bottom: none;
  padding: 0 10px;
  width: 56px;
  height: 100%;
}

.header .user-info .user-avatar img {
  margin-top: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.header .user-info .user-avatar .caret {
  position: absolute;
  top: 39px;
  right: 10px;
}

// .header .user-info .user-avatar:hover {
//   border-color: #d8d8d8;
// }

// .header .user-info .user-avatar:hover .caret {
//   -webkit-transform: rotate(180deg);
//   -ms-transform: rotate(180deg);
//   transform: rotate(180deg);
// }

.header .user-info .user-avatar:hover .user-menu {
  display: block;
}

// .header .user-info .user-avatar:hover:after {
//   content: " ";
//   position: absolute;
//   height: 10px;
//   bottom: -1px;
//   left: 1px;
//   right: 1px;
//   background-color: #fff;
// }

.header .user-info .user-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 80px;
  border: 1px solid #d8d8d8;
  background-color: #fff;
  font-size: 14px;
  color: #333;
  text-align: right;
  padding: 15px 10px 5px;
  text-align: center;
}

.header .user-info .user-menu li {
  margin-bottom: 6px;
}

.header .user-info .user-menu li > a {
  color: #999;
  display: block;
  word-break: keep-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header .user-info .user-menu li > a:hover {
  color: #ef4238;
  text-decoration: underline;
}

.header .user-info .user-menu li.text {
  word-break: keep-all;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.header .user-info .no-login-menu {
  padding: 15px 24px 5px;
}

.movie-grid {
  padding-top: 20px;
  width: 1200px;
  margin: auto;
  .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}
.movie-list {
  display: flex;
  flex-wrap: wrap;
  .movie-item {
    position: relative;
    border: 1px solid #efefef;
    margin: -1px;
    margin-bottom: 50px;
  }
  .movie-poster {
    position: relative;
    // &::after {
    //   content: "";
    //   width: 100%;
    //   height: 100%;
    //   background: #000;
    //   position: absolute;
    //   top: 0;
    //   left: 0;
    //   opacity: 0.2;
    // }
    img {
      width: 160px;
      height: 220px;
      object-fit: cover;
    }
  }
  .movie-overlay {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: url()
      repeat-x bottom;
  }
  .movie-info {
    position: absolute;
    bottom: 10px;
    width: 100%;
    padding: 0 10px;
    color: #fff;
  }
  .movie-detail {
    height: 39px;
    line-height: 39px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    &:hover {
      background: #ef4238;
      a {
        color: #fff;
      }
    }
    a {
      color: #ef4238;
      display: block;
      font-size: 14px;
    }
  }
}
</style>
